import { _decorator, Component, error, Node } from 'cc';
import { SpecialResMgr } from './SpecialResMgr';
const { ccclass, property } = _decorator;
class ResMgr{
    constructor(){

    }
    private _mapMgr:Map<string,SpecialResMgr>=new Map();
    addMgr(name:string,mgr:SpecialResMgr){
        if(name.length<=0||!mgr){
            return;
        }
        if(this._mapMgr.get(name)){
            return;
        }
        this._mapMgr.set(name,mgr);

    }
    getMgr<T>(name:string):T{
        if(name.length<=0){
            return null;
        }
        return this._mapMgr.get(name) as T;
    }

}
export let resmgr=new ResMgr();